//
//  HomeVC.swift
//  HelloSwift
//
//  Created by alankong on 2016/11/17.
//  Copyright © 2016年 tuotiansudai. All rights reserved.
//

import UIKit

class HomeVC: UIViewController {

    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.title = "拓天速贷";
        self.view.backgroundColor = UIColor.white
        
        setupViews()
    }

    func setupViews() {
        let button = UIButton();
        button.size = CGSize(width:200, height:50)
        button.center = CGPoint(x: self.view.width/2, y: self.view.height/2)
        button.setTitle("Banner列表", for: UIControlState.normal)
        button.backgroundColor = UIColor.red
        self.view.addSubview(button)
        button.addTarget(self, action: #selector(clickAction(sender:)), for: UIControlEvents.touchUpInside)
    }
    
    func clickAction(sender: UIButton?) {
        let VC = BannerListVC()
        self.navigationController?.pushViewController(VC, animated: true)
    }
    
}
